package org.jeecg.common.modules.doctor.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.jeecg.common.modules.doctor.entity.DoctorRegister;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterKeyVo;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterPartVo;
import org.jeecg.common.modules.doctor.vo.DoctorRegisterVo;
import org.jeecg.common.modules.doctor.vo.DoctorReqVo;

/**
 * @Description: doctor_register
 * @Author: jeecg-boot
 * @Date:   2020-12-18
 * @Version: V1.0
 */
public interface DoctorRegisterMapper extends BaseMapper<DoctorRegister> {
    /**
     * 查询挂号的信息
     * @param visitTime
     * @param dataStart
     * @param pageSize
     * @return
     */
    List<DoctorRegisterVo> selectDoctorRegisterInfo(
            @Param("doctorName") String doctorName,
            @Param("hospitalId") String hospitalId,
            @Param("departmentId") String departmentId,
            @Param("visitTime") String visitTime,
            @Param("dataStart") Integer dataStart,
            @Param("pageSize") Integer pageSize);

    /**
     * 查询医生的总条数
     * @param visitTime
     * @return
     */
    int getDoctorRegisterCount(@Param("doctorName") String doctorName,
                               @Param("hospitalId") String hospitalId,
                               @Param("departmentId") String departmentId,
                               @Param("visitTime") String visitTime);

    /**
     * 出诊日期排重
     */
    List<DoctorRegisterKeyVo> getVisitTime(@Param("doctorId") String doctorId,
                                           @Param("nowDate") String nowDate);

    /**
     * 查询患者挂号页面的挂号信息
     */
    DoctorRegisterPartVo getRegisterPart(@Param("doctorRegisterId") String doctorRegisterId);

    /**
     * 获取出诊时间
     * @param vo
     * @return
     */
    DoctorRegisterVo queryDoctorsVisitTime(
            @Param("vo")  DoctorRegisterVo vo);

    /**
     * 挂号医院是否有号源
     * @param doctorId
     * @return
     */
    List<DoctorRegisterVo> getDoctorRegisterHospital(
            @Param("doctorId") String doctorId , @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("registerHospitalId") String registerHospitalId );

    /**
     * 查询是否有号
     * @param vo
     * @return
     */
    List<DoctorRegisterVo> queryOrderIsHave(
            @Param("vo")  DoctorRegisterVo vo);
    /**
     * 查询是否有号
     * @param vo
     * @return
     */
    List<DoctorRegisterVo> queryOrderIsHaveNew(
            @Param("vo")  DoctorRegisterVo vo);
}